/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import type { ProColumns } from '@ant-design/pro-table';
import type { TableItem } from '../_utils/index.d';

const getColumns = (activeKey: string) => {
  const columns: ProColumns<TableItem>[] = [
    {
      title: '订单id',
      dataIndex: 'order_id',
      search: false,
      width: 120,
      align: 'center',
      ellipsis: true,
    },
    {
      title: '运单号',
      dataIndex: 'waybill_no',
      search: false,
      width: 120,
      align: 'center',
      ellipsis: true,
    },
    {
      title: '绑定手机号',
      dataIndex: 'mobile',
      search: false,
      width: 100,
      align: 'center',
      ellipsis: true,
    },
    {
      title: '寄件人手机号',
      dataIndex: 'shipper_mobile',
      search: false,
      width: 100,
      align: 'center',
      ellipsis: true,
    },
    {
      title: '订单金额',
      dataIndex: 'order_money',
      search: false,
      width: 80,
      align: 'center',
      ellipsis: true,
    },
    {
      title: '实际运费金额',
      dataIndex: 'money',
      search: false,
      width: 120,
      align: 'center',
      ellipsis: true,
    },
    {
      title: '扣款时间',
      dataIndex: 'update_time',
      hideInTable: activeKey == 'bindDeduction',
      search: false,
      width: 180,
      align: 'center',
      ellipsis: true,
    },
  ];
  return columns;
};

export { getColumns };
